package com.yangzc.lion.sys.organization.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.yangzc.lion.common.model.BaseModel;
import com.yangzc.lion.sys.util.ModelUtil;

/**
 * 群组类别
 * 
 * @author 叶中奇
 */
public class SysOrgGroupCate extends BaseModel {

	private static final long serialVersionUID = 4411038483580567068L;
	/*
	 * 名称
	 */
	private String fdName;

	public String getFdName() {
		return fdName;
	}

	public void setFdName(String fdName) {
		this.fdName = fdName;
	}

	/*
	 * 关键字
	 */
	private String fdKeyword;

	public String getFdKeyword() {
		return fdKeyword;
	}

	public void setFdKeyword(String fdKeyword) {
		this.fdKeyword = fdKeyword;
	}

	/*
	 * 创建时间
	 */
	private Date fdCreateTime = new Date();

	public Date getFdCreateTime() {
		return fdCreateTime;
	}

	public void setFdCreateTime(Date fdCreateTime) {
		this.fdCreateTime = fdCreateTime;
	}

	/*
	 * 最后修改时间
	 */
	private Date fdAlterTime = new Date();

	public Date getFdAlterTime() {
		return fdAlterTime;
	}

	public void setFdAlterTime(Date fdAlterTime) {
		this.fdAlterTime = fdAlterTime;
	}

	/*
	 * 父类别
	 */
	private SysOrgGroupCate fdParent;

	public SysOrgGroupCate getFdParent() {
		return getHbmParent();
	}

	public void setFdParent(SysOrgGroupCate parent) {
		ModelUtil.checkTreeCycle(this, parent, "fdParent");
		setHbmParent(parent);
	}

	public SysOrgGroupCate getHbmParent() {
		return fdParent;
	}

	public void setHbmParent(SysOrgGroupCate parent) {
		this.fdParent = parent;
	}

	/*
	 * 子类别
	 */
	private List fdChildren;

	public List getFdChildren() {
		List rtnVal = new ArrayList();
		if (getHbmChildren() != null)
			rtnVal.addAll(getHbmChildren());
		return rtnVal;
	}

	public void setFdChildren(List children) {
		if (this.fdChildren == children)
			return;
		if (this.fdChildren == null)
			this.fdChildren = new ArrayList();
		else
			this.fdChildren.clear();
		if (children != null)
			this.fdChildren.addAll(children);
	}

	public List getHbmChildren() {
		return fdChildren;
	}

	public void setHbmChildren(List children) {
		this.fdChildren = children;
	}
}
